package com.cloudptt.wp.ui.more.advanced;

import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceScreen;

import com.cloudptt.api.product.log.Log;
import com.cloudptt.wp.R;
import com.cloudptt.wp.ui.BasePreferenceActivity;

public class LogSettingActivity extends BasePreferenceActivity
		implements OnPreferenceChangeListener, OnPreferenceClickListener, OnSharedPreferenceChangeListener {

	public static final String THIS_FILE = "LogSettingActivity";
	
	
//	SharedPreferences sp;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		addPreferencesFromResource(R.xml.prefs_log);
		
		/*int color = getResources().getColor(R.color.divide_c);
		Drawable divider = new ColorDrawable(color);
		this.getListView().setDivider(divider);
		this.getListView().setDividerHeight(1); 
		
		TextView backView = (TextView)findViewById(R.id.return_bt);
		TextView title = (TextView)findViewById(R.id.topbar_title);
		title.setText( getString(R.string.log_setting));
		backView.setOnTouchListener(new OnTouchListener() {
			@Override
			public boolean onTouch(View v, MotionEvent event) {
        	    finish();
				return false;
			}
		});*/

		initSummary();
	}
	
	private void initSummary()
	{
		
	}

	@Override
	public boolean onPreferenceChange(Preference preference, Object newValue) {
		Log.i(THIS_FILE, "onPreferenceChange:newValue="+newValue);
		return true;
	}

	@Override
	public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
		Log.i(THIS_FILE, "onSharedPreferenceChanged:key="+key );
	}

	@Override
	public boolean onPreferenceClick(Preference preference) {
		Log.i(THIS_FILE, "onPreferenceClick");
		return false;
	}
	
	@Override
	public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
		Log.i(THIS_FILE, "onPreferenceTreeClick");
		
		return false;
	}
}
